<!DOCTYPE HTML>

<html>
<head>
<script>
function startApp() {

	var cmd = document.getElementById("cmd").value;
	var para = document.getElementById("para").value;

	var evt = document.createEvent("CustomEvent");
	evt.initCustomEvent('myCustomEvent', true, false, cmd + '|' + para);
	// fire the event
	document.dispatchEvent(evt);
}


function startScreenshare() {
    var evt = document.createEvent("CustomEvent");
    evt.initCustomEvent('myCustomEvent', true, false, 'start_screenshare');
    // fire the event
    document.dispatchEvent(evt);
}

</script>
</head>
<body>


    <h3>Start Screenshare</h3>

    <button type="button" onclick="startScreenshare()" id="startScreenshare">start screenshare</button>

    <br/><br />
    <hr/>


    <h3>Start App</h3>

    <div>
        <label>Cmd:</label>
        <input type="text" id="cmd" style="width:600px; padding: 5px;" value="C:\Screenshare\ChromeNativeHost\ffmpeg_ScreenShare.exe" />
    </div>

    <br/>

    <div>
        <label>Para:</label>
        <input type="text" id="para" style="width:600px; padding: 5px;" value="-f gdigrab -framerate 15 -i desktop -f flv rtmp://54.67.55.252:5130/live/flashtest1/" />
    </div>

    <br/>
    <button type="button" onClick="startApp()" id="startApp">start App</button>

</body>
</html>